package com.chen.root.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author: ChenJinLong
 * @DATE: 2024/11/21
 **/
@Data
public abstract class BaseDO implements Serializable {

//    @ApiModelProperty("租户号")
//    @TableField(value = "tenant_id",fill = FieldFill.INSERT)
//    protected Integer tenantId;
//    @Version
//    @ApiModelProperty("乐观锁")
//    @TableField(value = "revision",fill = FieldFill.INSERT)
//    protected Integer revision;

    @ApiModelProperty("创建人")
    @TableField(value = "create_by",fill = FieldFill.INSERT)
    protected String createBy;

    @ApiModelProperty("注册时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    protected LocalDateTime createTime;

    @ApiModelProperty("更新人")
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    protected String updateBy;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    protected LocalDateTime updateTime;

    @TableLogic
    @TableField(value = "del_flag",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "逻辑删除标识：状态[0-正常，1-删除]", example = "0")
    protected String delFlag;
}
